package com.xbongbong.paas.toolbox.util;

import java.util.Map;

/**
 * @author 吴峰
 * @date 2021/07/13 14:19
 */
public class UrlUtil {

    public static String formatPcUrl(String url, Map<String, Object> options) {
        String params = null;
        for (Map.Entry<String, Object> entry : options.entrySet()) {
            if (params == null) {
                params = entry.getKey() + "=" + entry.getValue();
            } else {
                params += "&" + entry.getKey() + "=" + entry.getValue();
            }
        }
        return url + "?" + params;
    }
}
